//
//  XGCategoryButton.h
//  新闻
//
//  Created by 小果 on 16/3/30.
//  Copyright © 2016年 小果. All rights reserved.
//

#import <UIKit/UIKit.h>

@class XGCategoryButton;

typedef enum
{
    kNCButtonTypeNormal = 0,    // 普通状态
    kNCButtonTypeMoveable,      // 可移动，有背景，有图示
    kNCButtonTypeEdit           // 编辑，有背景，无图示
} kNCButtonType;

@protocol XGCategoryButtonDelegate <NSObject>

- (void)categoryButtonIsMoving:(XGCategoryButton *)button;
- (void)categoryButtonDidMoved:(XGCategoryButton *)button;

@end

@interface XGCategoryButton : UIButton

@property (nonatomic, weak) id<XGCategoryButtonDelegate> delegate;

// 按钮类别
@property (nonatomic, assign) kNCButtonType type;

// 按钮对应在数组中的索引，可以用于按钮的排序
@property (nonatomic, assign) NSInteger index;

#pragma mark 自定义按钮的实例化方法
- (id)initWithFrame:(CGRect)frame title:(NSString *)title index:(NSInteger)index;


@end
